


#ifndef _HID_COMMAND_H__
#define _HID_COMMAND_H__

#include <stdint.h>

int SamCommand_ExtractData(uint8_t * ptr, uint16_t objectLength, uint8_t tag, uint8_t* pdata, uint8_t* dlen);

int SamCommand_GetVersionInfo(uint8_t *resp, uint8_t* rlen);

int SamCommand_PerformAnticollision(uint8_t protocol, uint8_t *resp, uint8_t* rlen);

int SamCommand_SetDetectedCardInfo(uint8_t protocol, const uint8_t* csn, uint8_t csn_len, const uint8_t* atr, uint8_t alen, const uint8_t* sak,
	uint8_t* resp, uint8_t *rlen);

int SamCommand_SetDetectedCardInfo2(uint8_t protocol, const uint8_t* csn, uint8_t csn_len, 
	const uint8_t* atr, uint8_t alen, const uint8_t* sak, const uint8_t* do_tcl, uint8_t** resp, uint8_t *rlen);

int SamCommand_GetContentElement2(uint8_t** resp, uint8_t *rlen);

int SamCommand_ProcessKeyRollerCard(void);

int SamCommand_ProcessConfigCard(void);

int SamCommand_QueryECP(uint8_t** resp, uint16_t *rlen);

int SamCommand_LoadKey(uint8_t IsPersistent, const uint8_t keyOID[3], uint8_t keyLen, const uint8_t key[], 
	const uint8_t* rights, const uint8_t* role);

int SamCommand_Seos_Select(void);
int SamCommand_Seos_Select2(uint8_t **resp, uint16_t* rlen);

int SamCommand_Seos_GetLastDiversifier(uint8_t** resp, uint16_t *rlen);

int SamCommand_Seos_GetAlgoInfo(uint8_t** resp, uint16_t *rlen);

int SamCommand_Seos_Authenticate(const uint8_t adf[], uint8_t adfLen, 
	const uint8_t privEncKeyOid[3], const uint8_t privMacKeyOid[3], const uint8_t authKeyOid[3]);

int SamCommand_Seos_GetData(const uint8_t tag[], uint8_t tagLen, uint8_t readLen, uint8_t** resp, uint16_t *rlen);

int SamCommand_Seos_PutData(const uint8_t tag[], uint8_t tagLen, uint8_t writeLen, const uint8_t* data);


#endif





